package com.xiaoshuidi.cloud.module.member.controller.admin.point.vo;

import com.xiaoshuidi.cloud.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.time.LocalDateTime;

@Data
public class MemberPointChangesPageReqVo extends PageParam {

    @Schema(description = "变动日期起")
    private String beginTime;

    @Schema(description = "变动日期止")
    private String endTime;

    @Schema(description = "增减项，0减项，1增项")
    private Integer changeValueType;

    @Schema(description = "记录类型，0手动，1租金 ，2交易，3大转盘")
    private Integer recordType;

    @Schema(description = "发放类型，0手动 1自动")
    private Integer changeType;

    @Schema(description = "手机号")
    private String phone;

    private Long tenantUserId;

    public String getBeginTime() {
        if(StringUtils.isNotBlank(beginTime)){
            return beginTime.concat(" 00:00:00");
        }
        return beginTime;
    }

    public String getEndTime() {
        if(StringUtils.isNotBlank(endTime)){
            return endTime.concat(" 23:59:59");
        }
        return endTime;
    }

}
